<template>
  <div>
    <span class="title">{{'测试-'}}<a @click.prevent="goBack" class="back-class" href="#">项目详情</a></span>
    <el-tabs v-model="activeName" @tab-click="handleClick">
      <el-tab-pane label="测试包" name="first">
        <test-pack @checkCase="checkCase"></test-pack>
      </el-tab-pane>
      <el-tab-pane label="用例" name="second">
        <testcase v-if="activeName === 'second'"></testcase>
      </el-tab-pane>
    </el-tabs>
  </div>
</template>

<script>
export default {
  name: "testCaseIndex",
  components: {
    testcase: () => import("@/page/ProjectManage/modules/testcase/testcase"),
    testPack: () => import("@/page/ProjectManage/modules/testcase/testPack")
  },
  data () {
    return {
      activeName: 'first'
    }
  },
  methods: {
    goBack () {
      this.$router.push(`/view/project/details/${this.$route.params.id}`)
    },
    checkCase (row) {
      // this.activeName = 'second'
    },
    handleClick () {

    }
  }
}
</script>

<style scoped>

</style>